package com.sinosoft.weixin.service;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by 胡正莹 on 2017/11/09.
 * 通用校验类
 */
public class ServiceChecker {
  public static void notNull(Object obj, String msg) {
    if(null == obj){
      throw new ServiceException(msg);
    }
  }

  public static void notBlankStr(String str, String msg){
    if(StringUtils.isBlank(str)){
      throw new ServiceException(msg);
    }
  }
}
